package 笔试.海康威视;

import java.util.Scanner;

public class Main
{
    public static void main(String[] args)
    {
//        Scanner sc = new Scanner(System.in);

        System.out.println(method("aA", "aAAbbbb"));
    }
    public static int method(String J,String S)
    {
        int count=0;
        for (int i = 0; i < S.length(); i++)
        {
            for (int j = 0; j < J.length(); j++)
            {
                if (S.charAt(i)==J.charAt(j))
                    count++;
            }
        }
        return count;
    }

}
